import { _decorator, Component, instantiate } from 'cc';
import { ItemData } from './ItemData';
import { AttackData } from './AttackData';
const { ccclass, property } = _decorator;

@ccclass('CharacterState')
export class CharacterState extends Component {

    private attackData: AttackData

    public EquipWeapon(weapon: ItemData){
        if(weapon.prefab != null){
            // TODO
            // instantiate()
        
            this.attackData.ApplyWeaponData(weapon.data)
        }

        // TODO 更新属性
    }

}